package com.farm.state;

// 上下文类
public class AgriculturalMachineContext {
    private MachineState state;

    public AgriculturalMachineContext() {
        this.state = new IdleState();
    }

    public void setState(MachineState state) {
        this.state = state;
    }

    public MachineState getState() {
        return state;
    }

    public void request(String  machineName) {
        state.handle(this, machineName);
    }
}
